package com.cn.pack.controller;

import com.cn.pack.config.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(path = "/hello")
public class HelloController {

    @Autowired
    private User user;

    @RequestMapping(path = "/query")
    public String query(@RequestParam(value = "name") String name) {
        return "---------------name = " + user.getName();
    }
}
